<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="SLinkedList,de.polygonal.ds.SLinkedList,DESCENDING,INSERTION_SORT,MERGE_SORT,NUMERIC,head,tail,size,append,clear,concat,contains,dump,getIterator,getListIterator,insertAfter,isEmpty,join,merge,nodeOf,popDown,prepend,remove,removeHead,removeTail,reverse,shiftUp,sort,splice,toArray,toString" name="keywords">
<title>de.polygonal.ds.SLinkedList</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'SLinkedList - AS3 Data Structures For Game Developers';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">AS3 Data Structures For Game Developers v1.04</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?de/polygonal/ds/SLinkedList.html&amp;de/polygonal/ds/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;SLinkedList</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class SLinkedList"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">de.polygonal.ds</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class SLinkedList</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="Collection.html">Collection</a></td>
</tr>
</table>
<p></p>
  A singly linked list.
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#head">head</a> : <a href="../ds/SListNode.html">SListNode</a>
<div class="summaryTableDescription">
   The head node being referenced.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#size">size</a> : int<div class="summaryTableDescription">[read-only]
   
   The total number of items.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#tail">tail</a> : <a href="../ds/SListNode.html">SListNode</a>
<div class="summaryTableDescription">
   The tail node being referenced.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#SLinkedList()">SLinkedList</a>(... args)</div>
<div class="summaryTableDescription">
   Initializes an empty list.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#append()">append</a>(... args):<a href="../ds/SListNode.html">SListNode</a>
</div>
<div class="summaryTableDescription">
   Appends items to the list.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#clear()">clear</a>():void</div>
<div class="summaryTableDescription">
   
   Clears all items.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#concat()">concat</a>(... args):<a href="../ds/SLinkedList.html">SLinkedList</a>
</div>
<div class="summaryTableDescription">
   Concatenates the current list with all lists specified in the
   parameters and returns a new linked list.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#contains()">contains</a>(obj:*):Boolean</div>
<div class="summaryTableDescription">
   
   Determines if the collection contains a given item.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#dump()">dump</a>():String</div>
<div class="summaryTableDescription">
   Prints out all elements (for debug/demo purposes).</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getIterator()">getIterator</a>():<a href="../ds/Iterator.html">Iterator</a>
</div>
<div class="summaryTableDescription">
   
   Initializes an iterator object pointing to the first item in the
   collection.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getListIterator()">getListIterator</a>():<a href="../ds/SListIterator.html">SListIterator</a>
</div>
<div class="summaryTableDescription">
   Creates a list iterator object pointing to the first node in the list.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#insertAfter()">insertAfter</a>(itr:<a href="SListIterator.html">SListIterator</a>, obj:*):<a href="../ds/SListNode.html">SListNode</a>
</div>
<div class="summaryTableDescription">
   Inserts an item after a given iterator or appends it if the
   iterator is invalid.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isEmpty()">isEmpty</a>():Boolean</div>
<div class="summaryTableDescription">
   
   Checks if the collection is empty.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#join()">join</a>(sep:*):String</div>
<div class="summaryTableDescription">
   Converts the data in the linked list to strings, inserts the given
   separator between the elements, concatenates them, and returns the
   resulting string.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#merge()">merge</a>(... args):void</div>
<div class="summaryTableDescription">
   Merges the current list with all lists specified in the paramaters.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#nodeOf()">nodeOf</a>(obj:*, from:<a href="SListIterator.html">SListIterator</a> = null):<a href="../ds/SListIterator.html">SListIterator</a>
</div>
<div class="summaryTableDescription">
   Searches for an item in the list by using strict equality (===) and
   returns an iterator pointing to the node containing the item or null
   if the item was not found.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#popDown()">popDown</a>():void</div>
<div class="summaryTableDescription">
   Removes and prepends the tail node to the head.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#prepend()">prepend</a>(... args):<a href="../ds/SListNode.html">SListNode</a>
</div>
<div class="summaryTableDescription">
   Prepends items to the list.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#remove()">remove</a>(itr:<a href="SListIterator.html">SListIterator</a>):Boolean</div>
<div class="summaryTableDescription">
  Removes the node the iterator is pointing to while moving the
  iterator to the next node.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeHead()">removeHead</a>():*</div>
<div class="summaryTableDescription">
   Removes the head of the list and returns the head's data or null
   if the list is empty.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeTail()">removeTail</a>():*</div>
<div class="summaryTableDescription">
   Removes the tail of the list and returns the tail's data or null
   if the list is empty.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#reverse()">reverse</a>():void</div>
<div class="summaryTableDescription">
   Reverses the linked list in place.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#shiftUp()">shiftUp</a>():void</div>
<div class="summaryTableDescription">
   Removes and appends the head node to the tail.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#sort()">sort</a>(... sortOptions):void</div>
<div class="summaryTableDescription">
   Sorts the list.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#splice()">splice</a>(start:<a href="SListIterator.html">SListIterator</a>, deleteCount:uint = 0xffffffff, ... args):<a href="../ds/SLinkedList.html">SLinkedList</a>
</div>
<div class="summaryTableDescription">
   Adds nodes to and removes nodes from the list.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toArray()">toArray</a>():Array</div>
<div class="summaryTableDescription">
   
   Converts the collection into an array.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toString()">toString</a>():String</div>
<div class="summaryTableDescription">
   Prints out a string representing the current object.</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DESCENDING">DESCENDING</a> : int<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#INSERTION_SORT">INSERTION_SORT</a> : int<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#MERGE_SORT">MERGE_SORT</a> : int<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#NUMERIC">NUMERIC</a> : int<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">SLinkedList</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="head"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">head</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var head:<a href="../ds/SListNode.html">SListNode</a></code><p>
   The head node being referenced. This is the first node in the list.
   </p></div>
<a name="size"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">size</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>size:int</code>&nbsp;&nbsp;[read-only]<p>
   
   The total number of items.
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get size():int</code>
<br>
</div>
<a name="tail"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">tail</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var tail:<a href="../ds/SListNode.html">SListNode</a></code><p>
   The tail node being referenced. This is the last node in the list.
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="SLinkedList()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">SLinkedList</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function SLinkedList(... args)</code><p>
   Initializes an empty list. You can add initial items by passing
   them as a comma-separated list of values.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code>... <span class="label">args</span></code> &mdash; A list of comma-separated values to append.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="append()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">append</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function append(... args):<a href="../ds/SListNode.html">SListNode</a></code><p>
   Appends items to the list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code>... <span class="label">args</span></code> &mdash; A list of comma-separated values to append.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/SListNode.html">SListNode</a></code> &mdash; 
                        A SListNode object wrapping the data. If multiple values are
           added, the returned node represents the node that stores the
           data of the first argument.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="clear()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">clear</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function clear():void</code><p>
   
   Clears all items.
   </p></div>
<a name="concat()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">concat</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function concat(... args):<a href="../ds/SLinkedList.html">SLinkedList</a></code><p>
   Concatenates the current list with all lists specified in the
   parameters and returns a new linked list.
   <i>The original list and all passed lists are left unchanged.</i>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code>... <span class="label">args</span></code> &mdash; A list of one or more comma-separated SLinkedList objects.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/SLinkedList.html">SLinkedList</a></code> &mdash; 
                        A copy of the current list which also stores the values from
           the passed lists.
   
                        
                     </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../ds/SLinkedList.html#merge" target="">merge</a>
</div>
</div>
<a name="contains()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">contains</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function contains(obj:*):Boolean</code><p>
   
   Determines if the collection contains a given item.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The item to search for.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if the item exists, otherwise false.
   </td>
</tr>
</table>
</div>
<a name="dump()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">dump</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function dump():String</code><p>
   Prints out all elements (for debug/demo purposes).
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; A human-readable representation of the structure.
   </td>
</tr>
</table>
</div>
<a name="getIterator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getIterator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getIterator():<a href="../ds/Iterator.html">Iterator</a></code><p>
   
   Initializes an iterator object pointing to the first item in the
   collection.
      </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/Iterator.html">Iterator</a></code> &mdash; 
                        An iterator object.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="getListIterator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getListIterator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getListIterator():<a href="../ds/SListIterator.html">SListIterator</a></code><p>
   Creates a list iterator object pointing to the first node in the list.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/SListIterator.html">SListIterator</a></code></td>
</tr>
</table>
</div>
<a name="insertAfter()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">insertAfter</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function insertAfter(itr:<a href="SListIterator.html">SListIterator</a>, obj:*):<a href="../ds/SListNode.html">SListNode</a></code><p>
   Inserts an item after a given iterator or appends it if the
   iterator is invalid.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">itr</span>:<a href="SListIterator.html">SListIterator</a></code> &mdash; An iterator object pointing to the node after which the
              given data is inserted.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; The data to insert.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/SListNode.html">SListNode</a></code> &mdash; 
                        A singly linked list node wrapping the data.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="isEmpty()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isEmpty</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function isEmpty():Boolean</code><p>
   
   Checks if the collection is empty.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if empty, otherwise false.
   </td>
</tr>
</table>
</div>
<a name="join()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">join</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function join(sep:*):String</code><p>
   Converts the data in the linked list to strings, inserts the given
   separator between the elements, concatenates them, and returns the
   resulting string.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">sep</span>:*</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; A string consisting of the data converted to strings and
           separated by the specified parameter. 
   </td>
</tr>
</table>
</div>
<a name="merge()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">merge</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function merge(... args):void</code><p>
   Merges the current list with all lists specified in the paramaters.
   The list is directly modified to reflect the changes.
   <i>Due to the rearrangement of the node pointers all passed lists
   become invalid and should be discarded</i>.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code>... <span class="label">args</span></code> &mdash; A list of one or more comma-separated SLinkedList objects.
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../ds/SLinkedList.html#concat" target="">concat</a>
</div>
</div>
<a name="nodeOf()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">nodeOf</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function nodeOf(obj:*, from:<a href="SListIterator.html">SListIterator</a> = null):<a href="../ds/SListIterator.html">SListIterator</a></code><p>
   Searches for an item in the list by using strict equality (===) and
   returns an iterator pointing to the node containing the item or null
   if the item was not found.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">obj</span>:*</code> &mdash; obj  The item to search for
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">from</span>:<a href="SListIterator.html">SListIterator</a></code> (default = <code>null</code>)<code></code> &mdash; from A SListIterator object pointing to the node in the list
           from which to start searching for the item.
            
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/SListIterator.html">SListIterator</a></code> &mdash; 
                        A SListIterator object pointing to the node with the found
           item or null if no item exists matching the input data or the
           iterator is invalid.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="popDown()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">popDown</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function popDown():void</code><p>
   Removes and prepends the tail node to the head.
   </p></div>
<a name="prepend()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">prepend</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function prepend(... args):<a href="../ds/SListNode.html">SListNode</a></code><p>
   Prepends items to the list.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code>... <span class="label">args</span></code> &mdash; A list of one or more comma-separated values to prepend.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/SListNode.html">SListNode</a></code> &mdash; 
                        A SListNode object wrapping the data. If multiple values are
           added, the returned node represents the node that stores the
           data of the first argument.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="remove()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">remove</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function remove(itr:<a href="SListIterator.html">SListIterator</a>):Boolean</code><p>
  Removes the node the iterator is pointing to while moving the
  iterator to the next node.
  
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">itr</span>:<a href="SListIterator.html">SListIterator</a></code> &mdash; An iterator object pointing to the node to remove.
  
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if the removal succeeded, otherwise false.
  </td>
</tr>
</table>
</div>
<a name="removeHead()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeHead</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeHead():*</code><p>
   Removes the head of the list and returns the head's data or null
   if the list is empty.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; The data which was associated with the removed node.
   </td>
</tr>
</table>
</div>
<a name="removeTail()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeTail</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeTail():*</code><p>
   Removes the tail of the list and returns the tail's data or null
   if the list is empty.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; The data which was associated with the removed node.
   </td>
</tr>
</table>
</div>
<a name="reverse()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">reverse</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function reverse():void</code><p>
   Reverses the linked list in place.
   </p></div>
<a name="shiftUp()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">shiftUp</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function shiftUp():void</code><p>
   Removes and appends the head node to the tail.
   </p></div>
<a name="sort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">sort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function sort(... sortOptions):void</code><p>
   Sorts the list.
   
   The default sorting algorithm is 'mergesort'.
   
   If the LinkedList.INSERTION_SORT flag is used, the list is sorted
   using the insertion sort algorithm instead, which is much faster for
   nearly sorted lists.
   <ul><li>default sort behaviour: mergesort, numeric, ascending</li>
   <li>sorting is ascending (for character-strings: a precedes z)</li>
   <li>sorting is case-sensitive: Z precedes a</li>
   <li>the list is directly modified to reflect the sort order</li>
   <li>multiple elements that have identical values are placed
   consecutively in the sorted array in no particular order</li></ul>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code>... <span class="label">sortOptions</span></code> &mdash;   
   You pass an optional comparison function and/or one or more bitflags
   that determine the behavior of the sort method.<br/>
   Syntax: myList.sort(compareFunction, flags)<br/><br/>
   <i>compareFunction</i> - A comparison function used to determine the
                            sorting order of elements in an array
                            (optional).<br/>
                            It should take two arguments and return a
                            result of -1 if A < B, 0 if A == B and
                            1 if A > B in the sorted sequence.
   <br/><br/>
   <i>flags</i> - One or more numbers or defined constants, separated by
                  the | (bitwise OR) operator, that change the behavior
                  of the sort from the default:<br/>
                  2  or SortOptions.INSERTION_SORT<br/>
                  4  or SortOptions.CHARACTER_STRING<br/>
                  8  or SortOptions.CASEINSENSITIVE<br/>
                  16 or SortOptions.DESCENDING<br/>
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html" target="mm_external">http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html</a>
</div>
</div>
<a name="splice()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">splice</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function splice(start:<a href="SListIterator.html">SListIterator</a>, deleteCount:uint = 0xffffffff, ... args):<a href="../ds/SLinkedList.html">SLinkedList</a></code><p>
   Adds nodes to and removes nodes from the list.
   This method directly modifies the list without making a copy.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">start</span>:<a href="SListIterator.html">SListIterator</a></code> &mdash;       A SListIterator object pointing to the node where
                      the insertion or deletion begins. The iterator is
                      updated so it still points to the original node,
                      even if the node now belongs to another list.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">deleteCount</span>:uint</code> (default = <code>0xffffffff</code>)<code></code> &mdash; An integer that specifies the number of nodes to
                      delete. This number includes the node referenced
                      by the iterator. If no value is specified for the
                      deleteCount parameter, the method deletes all of
                      the nodes from the start iterator to the tail
                      of the list. If the value is 0, no nodes are
                      deleted.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code>... <span class="label">args</span></code> &mdash;        Specifies the values to insert into the list,
                      starting at the iterator's node.
   
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../ds/SLinkedList.html">SLinkedList</a></code></td>
</tr>
</table>
</div>
<a name="toArray()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toArray</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toArray():Array</code><p>
   
   Converts the collection into an array.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code> &mdash; An array.
   </td>
</tr>
</table>
</div>
<a name="toString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toString():String</code><p>
   Prints out a string representing the current object.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; A string representing the current object.
   </td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="DESCENDING"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">DESCENDING</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const DESCENDING:int</code>
</div>
<a name="INSERTION_SORT"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">INSERTION_SORT</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const INSERTION_SORT:int</code>
</div>
<a name="MERGE_SORT"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">MERGE_SORT</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const MERGE_SORT:int</code>
</div>
<a name="NUMERIC"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">NUMERIC</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const NUMERIC:int</code>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">Copyright 2007-2008 Michael Baczynski | POLYGONAL</center>
</div>
</body>
</html>
<!--Copyright 2007-2008 Michael Baczynski | POLYGONAL-->
